import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Index from './views/Index.vue'

import Knowledge from './views/knowledgeBox.vue'
import questionCheck from './views/questionCheck.vue'
import questionEdit from './views/questionEdit.vue'
import questionHistory from './views/questionHistory.vue'
import personManage from './views/personManage.vue'
import analyzeAllVisitor from './views/analyzeAllVisitor.vue'
import analyzeHotSearch from './views/analyzeHotSearch.vue'
import analyzeDistribution from './views/analyzeDistribution.vue'

Vue.use(Router)

export default new Router({
  mode  : 'history',
  base  : process.env.BASE_URL,
  routes: [
    {
      path     : '/',
      name     : 'home',
      component: Home
    },
    {
      path     : '/index',
      name     : 'index',
      redirect : "/index/knowledgeBox",
      component: Index,
      children : [
        {
          path     : '/index/knowledgeBox',   //知识体系
          name     : 'knowledge',
          component: Knowledge
        },
        {
          path     : '/index/questionCheck',   //审核问题
          name     : 'questionCheck',
          component: questionCheck
        },
        {
          path     : '/index/questionEdit/:id',   //编辑问题
          name     : 'questionEdit',
          component: questionEdit
        },
        {
          path     : '/index/questionHistory/:id',   //历史纪录
          name     : 'questionHistory',
          component: questionHistory
        },
        {
          path     : '/index/personManage',   //人员管理
          name     : 'personManage',
          component: personManage
        },
        {
          path     : '/index/analyzeAllVisitor',   //总访问量
          name     : 'analyzeAllVisitor',
          component: analyzeAllVisitor
        },
        {
          path     : '/index/analyzeHotSearch',   //热门搜索
          name     : 'analyzeHotSearch',
          component: analyzeHotSearch
        },
        {
          path     : '/index/analyzeDistribution',   //知识分布
          name     : 'analyzeDistribution',
          component: analyzeDistribution
        },
      ]
    },
    
  ]
})
